package com.qing.eduservice.controller;


import com.qing.emailservice.entity.pojo.UcenterMember;
import com.qing.emailservice.service.UcenterMemberService;
import org.springframework.beans.BeanUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 评论 前端控制器
 * </p>
 *
 * @author Yjx
 * @since 2022-09-18
 */
@RestController
@RequestMapping("/eduservice/comment")
public class EduCommentController {

    private  final UcenterMemberService memberService;

    public EduCommentController(UcenterMemberService memberService) {
        this.memberService = memberService;
    }

    //根据token字符串获取用户信息
    @PostMapping("getInfoUc/{id}")
    public UcenterMember getInfo(@PathVariable String id) {
//根据用户id获取用户信息
        UcenterMember ucenterMember = memberService.getById(id);
        UcenterMember memeber = new UcenterMember();
        BeanUtils.copyProperties(ucenterMember,memeber);
        return memeber;
    }


}

